import React from 'react';
import {View, Text} from 'react-native';
import styles from './styles'
import Icon from 'react-native-vector-icons/Entypo';
import {useSafeAreaInsets } from 'react-native-safe-area-context';
// import { useNavigation } from '@react-navigation/native';
// 这是解构 props
function Home({navigation}) {
  // const navigation = useNavigation()
  const safe = useSafeAreaInsets()
  return (
    <View style={{
      paddingTop:safe.top
    }}>
      <View style={styles.container}><Text style={styles.fontColor}> Hello sdfsdsdf! </Text>
      <Text style={styles.fontColor}> Hello ! </Text></View>
      <View style={styles.main}>
        <Text style={[styles.main.Text,styles.main.textBg]}>
          kkkk
        </Text>
        <Icon onPress={()=> navigation.goBack()} name="chevron-left" size={30} color="#900" />
      </View> 
    </View>
  );
}

export default Home;
